<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<cms_DataType>" %>
<%@ Import Namespace="Vit.CMS" %>
<%@ Import Namespace="Vit.CMS.Data" %>
<% bool isNew = this.Model == null || this.Model.DataTypeId <= 0; %>
<div class="ui-widget">
    <% Html.EnableClientValidation(); %>
    <%= Html.ValidationSummary("Data validation error") %>
    <% using (Html.BeginForm())
   { %>
    <table>
        <tr>
            <%= Html.EditColumnFor(o=>o.Name) %>
            <%= Html.EditColumnFor(o=>o.DbType) %>
        </tr>
        <tr>
            <%= Html.EditColumnFor(o=>o.SystemType) %>
            <%= Html.EditColumnFor(o=>o.DisplayControl) %>
        </tr>
        <tr>
            <%= Html.EditColumnFor(o=>o.EditControl) %>
            <%= Html.EditColumnFor(o=>o.DisplayFormat) %>
        </tr>
        <tr>
            <%= Html.EditColumnFor(o=>o.SampleInput) %>
        </tr>
    </table>
    <hr />
    <p>
        <input type="submit" value='<%= isNew ? Html.Localize("Create") : Html.Localize("Update") %>' class="ui-state-default ui-corner-all" />
    </p>
<%} %>
</div>
